home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / TPWENG / RECUNLCK.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-22  |  579b  |  28 lines

  1. program RecUnlck;
  2. uses PXEngine, WinCrt;
  3.  
  4. const TableName = 'Table';
  5.  
  6. var   PxErr: Integer;
  7.       TblHandle: TableHandle;
  8.       LckHandle: LockHandle;
  9.  
  10. procedure PX(Code : integer);
  11. begin
  12.   writeln(PXErrMsg(Code));
  13. end;
  14.  
  15. begin
  16.   PX(PXWinInit('MyApp', pxShared));
  17.   PX(PXTblOpen(TableName, TblHandle, 0, False));
  18.   PX(PXNetRecLock(TblHandle, LckHandle));
  19.  
  20.   (* Unlock previously locked record *)
  21.   PxErr := PXNetRecUnlock(TblHandle, LckHandle);
  22.   if PxErr <> PxSuccess then
  23.     Writeln(PxErrMsg(PxErr));
  24.  
  25.   PX(PXTblClose(TblHandle));
  26.   PX(PXExit);
  27. end.
  28.